package jwlee.testitext;

import java.io.InputStream;

import org.xml.sax.InputSource;

import com.lowagie.text.DocListener;
import com.lowagie.text.html.HtmlParser;
import com.lowagie.text.html.SAXmyHtmlHandler;
import com.lowagie.text.pdf.BaseFont;

public class ITextSurportHtmlParser extends HtmlParser {
	public ITextSurportHtmlParser() {
		super();
	}

	public void goGB(DocListener document, InputStream is) {
		try {
			BaseFont bfComic = BaseFont.createFont("STSong-Light",
					"UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);

			parser.parse(new InputSource(is), new SAXmyHtmlHandler(document,
					bfComic));
		} catch (Exception e) {
			e.printStackTrace(System.out);
		}

	}

}
